﻿//-----------------------------------------------------------------------------
// Copyright (C) Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------------------------


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.ComponentModel;

using Microsoft.WindowsAPICodePack.Shell;

namespace Microsoft.LibraryManagerDemo.Models
{
    /// <summary>
    /// Represents a shell folder model.
    /// </summary>
    public class Folder : Model
    {
        #region Fields

        private bool _isDefault;

        #endregion

        #region Properties

        /// <summary>
        /// Gets the name of this folder
        /// </summary>
        public string Name { get; private set; }

        /// <summary>
        /// Gets the path of this folder
        /// </summary>
        public string Path { get; private set; }

        /// <summary>
        /// Gets or sets a value indicating whether this is the default folder in the library
        /// </summary>
        public bool IsDefault
        {
            get { return _isDefault; }
            set
            {
                if (value != _isDefault)
                {
                    _isDefault = value;
                    NotifyPropertyChanged("IsDefault");
                }
            }
        }

        #endregion

        #region Initializers

        /// <summary>
        /// Initializes a new instance of this type.
        /// </summary>
        /// <param name="name">The name of the folder.</param>
        /// <param name="path">The full path of the folder.</param>
        /// <param name="isDefault">Is default folder.</param>
        public Folder(string name, string path, bool isDefault)
        {
            this.Name = name;
            this.Path = path;
            this.IsDefault = isDefault;
        }

        #endregion
    }
}
